package book;

public class BookList {
    private Book[] books = new Book[10];
    private int num;  //书籍数量

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }
    //用于返回数组里的一个元素
    public Book getBooks(int pos) {
        return this.books[pos];
    }

    public void setBooks(int pos,Book book) {
        this.books[pos] = book;
    }
    public Book[] Books(){
        return books;
    }

    public  BookList(){

        this.books[0] = new Book("a","b",1,"d");

        this.books[1] = new Book("s","d",2,"q");

        this.books[2] = new Book("d","g",3,"d");

        this.num = 3;

    }
}
